package com.usian.controller;

import com.usian.pojo.Emp;
import com.usian.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

    @Autowired
    private EmpService empService;

    @RequestMapping("test")
    public String Test(){
        return "我的springboot 项目";
    }

    @RequestMapping("findAll")
    public List<Emp> findAll(){
        return empService.findAll();
    }
}
